<template>
	<view class="mainpadding" v-if="pageShow">
		<u-parse :content="systeminfo"></u-parse>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				systeminfo: {},
				type: "",
				pageShow: false
			}
		},
		onLoad(options) {
			let type = options.type
			this.type = type
			if (type == 1) this.settitle("用户协议")
			if (type == 2) this.settitle("隐私政策")
			if (type == 4) this.settitle("关于我们")
			this.system()
		},
		methods: {
			settitle(val) {
				uni.setNavigationBarTitle({
					title: val
				})
			},
			system() {
				let data = {
					pidtype:"about_set",
					type:""
				}
				if(this.type==1){
					data.type = "user_xy"
				}
				if(this.type==2){
					data.type = "user_yszc"
				}
				if(this.type==4){
					data.type = "about_us"
				}
				httpRequest.request('/api/index/getConfigInfoItem', 'POST',data).then(res => {
					this.systeminfo = res.data
					this.pageShow = true
				})
			}
		}
	}
</script>

<style>

</style>